﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NeuralNetworks.Layers;
using NeuralNetworks.Neurons;

namespace NeuralNetworks.FileParsing
{
    class Bias : LayerPart
    {
        private int neuronNumber;
        private double weight;

        public Bias(int nn, double w)
        {
            this.neuronNumber = nn;
            this.weight = w;
        }

        public void apply(Layer current, Layer next)
        {
            if (current != null)
            {
                ((Neuron)current.Neurons[neuronNumber]).BiasWeight = weight;
            }
        }
    }
}
